package com.heisenhub.common.feignClient.log;

import org.slf4j.Logger;

/**
 * @author sen
 * @description  Feign自定义日志
 * @date 2024/1/17 11:11
 */

public class InfoFeignLogger  extends feign.Logger {

    private final Logger logger;

    public InfoFeignLogger(Logger logger) {
        this.logger = logger;
    }

    @Override
    protected void log(String configKey, String format, Object... args) {
        if (logger.isInfoEnabled()) {
            logger.info(String.format(methodTag(configKey) + format, args));
        }
    }
}